#
# Copyright (C) 2023
#
# Brick Yang <printfxxx@163.com>
#
# This program is free software. You can redistribute it and/or
# modify it as you like.
#

pmu_files = files('Kbuild')

if cfgs.get('arm64') == true
	pmu_files += files('pmu_arm64.c')
endif

custom_target('pmu_kmod', output: 'pmu.ko', command: kbuild_cmd, env: kenvs,
	      input: pmu_files, build_always_stale: true, build_by_default: true)

meson.add_install_script(kinst_cmd.format(meson.current_build_dir()).split())
